<script>
   function change_font_size(pref){
      css = document.getElementById('font-size');
      font_size = pref['font_size']
      if(font_size == 'medium'){
         css.href = '/static/font-medium.css';
      }else {
         css.href = '/static/font-normal.css';
      }
   }

setTimeout(function(){
   $.ajax({
      type: "GET",
      url: "/pref/query",
      dataType: 'JSON',
      success: function (result) {
         change_font_size(result)
      },
      error : function() {
      }
   });
}, 1000);
</script>
